package com.example.pattern.adapter;

/**
 * 被适配者
 *
 * @author FM_南风
 * @date 2024/6/27 13:54
 */
public class AudioPlayer implements MediaPlayer{
    @Override
    public void play(String mediaType, String fileName) {
        if (mediaType.equalsIgnoreCase("mp3")) {
            System.out.println("播放MP3文件: " + fileName);
        } else {
            System.out.println("使用" + mediaType + "媒体播放");
        }
    }
}
